{template block/header}
<div id="bodywrap">
    <table class="layout">
        <tr>
            <td class="left">
                <div class="mainbody">
                    <!--{if $photos}-->
                    <div class="col titbg">
                        <h1 class="f_left">{lang photo_list}</h1>
                        <h4 class="f_left">{lang total_photo|$total_num}</h4>
						<div class="dropmenu f_right viewtype">
							<span class="label">{lang view_type}:</span>
							<div class="selectlist">
							<div class="selected"></div>
							<ul class="optlist">
							<li class="current"><a href="{link ctl=photos act=index aid=$album_info['id']}"><span>{lang flat_mode}</span></a></li>
							<li><a href="{link ctl=photos act=slide aid=$album_info['id']}"><span>{lang slide_mode}</span></a></li>
							</ul>
							</div>
						</div>
                        {$photo_col_menu}
                    </div>
                    <div class="innercol grid">
                        <div class="gallary_wrap">
                            <!--{loop $photos $k $v}-->
                            <div class="gallary_item">
                                <div class="item">
                                    <div class="pic_box">
                                        <table>
                                            <tr>
                                                <td>
                                                    {$v['img_thumb']}
                                                </td>
                                            </tr>
                                        </table>
                                        
                                    </div>
                                    <div class="pic_ctl">
                                        <ul class="btns">
                                            <!--{if $loggedin}-->
                                            <li><a href="javascript:void(0)" onclick="Mui.box.show('{link ctl=photos act=confirm_delete id=$v['id']}',true);" title="{lang move_to_trash}"><span class="i_littletrash sprite"></span></a></li>
                                            <li><a href="javascript:void(0)" onclick="Mui.box.show('{link ctl=photos act=modify id=$v['id']}',true);" title="{lang modify}"><span class="i_edit sprite"></span></a></li>
                                            <li><a href="javascript:void(0)" onclick="Mui.box.show('{link ctl=albums act=update_cover pic_id=$v['id']}');" title="{lang set_cover}"><span class="i_cover sprite"></span></a></li>
                                            <li><a href="javascript:void(0)" onclick="Mui.box.show('{link ctl=photos act=rotate id=$v['id']}',true);" title="{lang rotate_image}"><span class="i_rotate sprite"></span></a></li>
                                            <li><a href="javascript:void(0)" onclick="Mui.box.show('{link ctl=photos act=move id=$v['id']}',true);" title="{lang move_photo}"><span class="i_moveto sprite"></span></a></li>
                                            <li><a href="javascript:void(0)" onclick="Mui.box.show('{link ctl=photos act=reupload id=$v['id']}',true);" title="{lang reupload_photo}"><span class="i_reupload sprite"></span></a></li>
                                            <!--{/if}-->
                                            <!--{$v['photo_control_icons']}-->
                                        </ul>
                                    </div>
                                    <div class="clear brief">
                                        <span class="f_left"></span>
                                        <span class="f_right gray">
                                            {if $show_takentime && $v['taken_time']}
                                            {lang in_taken_time}{echo date('Y-m-d',$v['taken_time'])}
                                            {else}
                                            {lang in_upload_time}{echo date('Y-m-d',$v['create_time'])}
                                            {/if}
                                        </span>
                                    </div>
                                </div>
                                <div class="info">
                                    <div class="title">
                                    <!--{if $loggedin}--><input class="selitem" type="checkbox" name="sel_id[{$v['id']}]" value="1" /><span class="name"><a nid="{$v['id']}" title="{lang click_to_rename}" href="javascript:void(0)" onclick="Madmin.rename(this,'{link ctl=photos act=rename id=$v['id']}')">{$v['name']}</a></span>
                                    <!--{else}-->
                                    <span class="name">{$v['name']}</span>
                                    <!--{/if}-->
                                    </div>
                                    <div class="info_col">
                                        <span class="f_left gray">{lang view_nums|`$v['hits']`} </span>
                                        <span class="f_right gray"><!--{if $v['comments_num'] && $enable_comment}--><a href="{link ctl=photos act=view id=$v['id']}#comments">{lang comments_num|`$v['comments_num']`}</a><!--{/if}--> <!--{if $v['is_cover']}--><span class="cover">{lang cover}</span><!--{/if}--></span>
                                    </div>
                                </div>
                            </div>
                            <!--{/loop}-->
                        </div>
                        <div class="bot_toolbar">
                            <div class="f_left paginator">
                                {$pagestr}
                            </div>
                            <div class="f_right">
                                <!--{if $loggedin}--><label><input type="checkbox" value="1" onclick="Madmin.check_all('.selitem',this.checked)" />{lang sel_all}</label> <span class="i_trash_sp sprite"></span> <a href="javascript:void(0)" onclick="Madmin.checked_action('.selitem','{link ctl=photos act=confirm_delete_batch}');">{lang delete_selected}</a> <span class="i_move_sp sprite"></span> <a href="javascript:void(0)" onclick="Madmin.checked_action('.selitem','{link ctl=photos act=move_batch}');">{lang move_selected}</a>
                            {$photo_multi_opt}
                            <!--{/if}-->
                            </div>
                            <div class="clear"></div>
                        </div>
                    {if $enable_comment}
                        <div class="col titbg">
                            <h1 class="f_left">{lang all_album_comments}</h1>
                            <h4 class="f_left">{lang t_comments_num|`$album_info['comments_num']`}</h4>
                        </div>
                        <div class="innetcol">
                            <div class="comment_form">
                                <form id="album_comment_form" action="{link ctl=comments act=post}" method="post" onsubmit="return false;">
                                    <input type="hidden" name="ref_id" value="{$ref_id}" />
                                    <input type="hidden" name="type" value="{$comments_type}" />
                                    {if $loggedin}
                                    <div class="field">
                                        {lang loginwith|<span class="title_c">`$u_info['user_nicename']`</span>}<a href="{link ctl=users act=logout}"  onclick="Mui.box.show(this.href);return false;">{lang logout}</a> ?
                                        <input type="hidden" name="email" value="{if isset($u_extrainfo['email'])}{$u_extrainfo['email']}{/if}" />
                                        <input type="hidden" name="author" value="{$u_info['user_nicename']}" />
                                    </div>
                                    {else}
                                    <div class="field">
                                        <div class="label">{lang email}</div>
                                        <div class="ipts"><input type="text" class="inputstyle iptw2" name="email" /></div>
                                        <div class="clear"></div>
                                    </div>
                                    <div class="field">
                                        <div class="label">{lang comment_user} *</div>
                                        <div class="ipts"><input type="text" class="inputstyle iptw2" name="author" /></div>
                                        <div class="clear"></div>
                                    </div>
                                    {if $enable_comment_captcha}
                                    <div class="field">
                                        <div class="label">{lang captcha_code} *</div>
                                        <div class="ipts"><input type="text" class="inputstyle iptw1" name="captcha" /> <img src="{link ctl=captcha}" align="absmiddle" class="captcha" title="{lang click_to_reload}" onclick="reload_captcha(this)" /></div>
                                        <div class="clear"></div>
                                    </div>
                                    {/if}
                                    {/if}
                                    <div class="field">
                                        <div class="label">{lang comment_content} *</div>
                                        <div class="ipts"><textarea class="inputstyle ipttextarea" name="content"></textarea></div>
                                        <div class="clear"></div>
                                    </div>
                                    <div class="field">
                                        <div class="label"> &nbsp;</div>
                                        <div class="ipts"><input type="submit" name="submit" class="ylbtn f_left" value="{lang post_comments}" onclick="Mui.box.callback=function(){ reload_comments('{link ctl=comments act=more ref_id=$ref_id type=$comments_type}');$('#album_comment_form').get(0).reset(); };Mui.form.sendAuto('album_comment_form');" /></div>
                                        <div class="clear"></div>
                                    </div>
                                </form>
                            </div>
                            <div class="comment_list">
                                {template comments/more}
                            </div>
                            <div class="clear"></div>
                        </div>
                    {/if}
                    </div>
                    <!--{else}-->
                        <div class="no_data_info">
                            <!--{if $is_search}-->
                            <div class="pic no_photo_search"></div>
                            <div class="data_msg">
                                <div>{lang no_photo_search_notice}</div >
                                <div class="button"><a href="{link ctl=photos act=index aid=$album_info['id']}">{lang all_photo_this_album}</a></div>
                            </div>
                            <div class="clear"></div>
                            <!--{else}-->
                            <div class="pic no_picture"></div>
                            <div class="data_msg">
                                
                                <!--{if $loggedin}-->
                                <div>{lang no_photo_notice}</div >
                                <div class="button"><div class="bigbutton"><a href="{link ctl=upload act=multi aid=$album_info['id']}"><span>{lang upload_new_photo}</span></a></div></div>
                                <!--{else}-->
                                <div>{lang no_photo_notice_notlogin}</div >
                                <div class="button"><a href="{link ctl=albums}">{lang view_all_album}</a></div>
                                <!--{/if}-->
                            </div>
                            <!--{/if}-->
                            
                            <div class="clear"></div>
                        </div>
                    <!--{/if}-->
                </div>
            </td>
            <td class="right">
                <div class="sidebar">
                    <!--{if $loggedin}-->
                    <div class="mb10">
                        <div class="bigbutton"><a href="{link ctl=upload act=multi aid=$album_info['id']}"><span>{lang upload_new_photo}</span></a></div>
                    </div>
                    <!--{/if}-->
                    <div class="album_info">
                        <h2 class="title_c">
                            <!--{if $loggedin}--><div class="inline_edit" title="点击可编辑" onclick="Madmin.inline_edit(this,'{link ctl=albums act=modify_name_inline id=$album_info['id']}')">{$album_info['name']} <span class="i_editinfo sprite"></span></div>
                            <!--{else}-->
                                <div class="inline lht2">
                                    {$album_info['name']}
                                </div>
                            <!--{/if}-->
                        </h2>
                        <div class="info_body">
                            <!--{if $loggedin}-->
                            <div class="inline_edit" title="{lang click_editable}" onclick="Madmin.inline_edit(this,'{link ctl=albums act=modify_desc_inline id=$album_info['id']}')"><!--{if $album_info['desc']}-->{$album_info['desc']}<!--{else}-->{lang no_album_desc}<!--{/if}-->
                                <span class="i_editinfo sprite"></span>
                            </div>
                            <!--{else}-->
                                <div class="inline">
                                    {$album_info['desc']}
                                </div>
                            <!--{/if}-->
                        </div>
                        <div class="tags mb10">
                            <!--{if $loggedin}-->
                            <div class="inline_edit" title="{lang click_editable}" onclick="Madmin.inline_edit(this,'{link ctl=albums act=modify_tags_inline id=$album_info['id']}')">
                                {lang tags}: 
                                <!--{if !$album_info['tags']}-->{lang no_album_tags}<!--{else}-->{$album_info['tags']}<!--{/if}-->
                                <span class="i_editinfo sprite"></span>
                            </div>
                            <!--{else}-->
                                <!--{if $album_info['tags']}-->
                                <div class="inline">{lang tags}: 
                                <!--{loop $album_info['tags_list'] $v}-->
                                    <a href="{link ctl=albums act=index tag=$v}">{$v}</a>
                                <!--{/loop}-->
                                </div>
                                <!--{/if}-->
                            <!--{/if}-->
                        </div>
                    </div>
                    <div class="priv">
                        <span class="f_left">{lang view_priv}:  <span class="i_greenicn sprite"></span> {echo enum_priv_type($album_info['priv_type'])}</span>
                        <!--{if $loggedin}--><span class="f_right"><a href="javascript:void(0)" onclick="Mui.box.show('{link ctl=albums act=modify_priv id=$album_info['id']}',true);">{lang modify}</a></span><!--{/if}-->
                        <div class="clear"></div>
                    </div>
                    <div class="mb10 tinfo">
                        <p>{lang total_photo|`$album_info['photos_num']`}</p>
                        <p>{lang create_date}{echo date('Y-m-d',$album_info['create_time'])}</p>
                        <p>{lang uploaded_date}{echo date('Y-m-d',$album_info['up_time'])}</p>
                    </div>
                    <div class="sidesearch mb20">
                        <h2>{lang search_photos}</h2>
                            <form class="search" action="{link ctl=photos act=search}" method="post">
                                <input type="hidden" name="album_id" value="{$album_info['id']}" />
                                <p class="mb10"><label><input type="radio" name="searchtype" value="album" checked="checked" /> {lang current_album} </label> <label><input type="radio" name="searchtype" value="all" /> {lang all_album}</label></p>
                                <input type="text" class="inputstyle iptw1" name="sname" value="{$search['name']}" />
                                <input type="submit" name="submit" class="ylbtn1 ml5" value="{lang search}" />
                            </form>
                    </div>
                    <div class="side_category">
                        <h2>{lang side_category}</h2>
                        <ul class="category_tree">
                            <!--{loop $categorylist $row}-->
                            <li class="deep-{$row['deep']}" deep="{$row['deep']}" style="padding-left:{echo 15*$row['deep']}px;{if $row['deep']>0}display:none;{/if}">
                                {if $row['last']}<strong class="nochild"></strong>{else}<span class="closed" onclick="toggle_tree(this)"></span>{/if}<a href="{link ctl=albums act=index cate=$row['id']}">{$row['name']}</a> 
                            </li>
                            <!--{/loop}-->
                            <li><strong class="nochild"></strong><a href="{link ctl=albums act=index cate=0}">{lang no_cate_album}</a></li>
                        </ul>
                    </div>
                    {$photo_sidebar}
                </div>
            </td>
        </tr>
    </table>
</div>
<script type="text/javascript">
$(function(){
    drop_select('.listorder');
    drop_select('.pset');
    drop_select('.viewtype');
});
</script>
{template block/footer}